package cn.mw.cmdb.enums;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 监控页面固定tab页
 */
public enum DefaultMonitorTabEnum {
    overView("default_00", "overView", "概览",Arrays.asList("69970427069333504"),null),
    monitorTarget("default_01", "monitorTarget", "监控指标",Arrays.asList("69970427069333504"),null),
    alertThreshold("default_02", "alertThreshold", "触发器",Arrays.asList("69970427069333504"),Arrays.asList("97141350197100544")),
    interfaceView("default_03", "interfaceView", "接口",Arrays.asList("69971125521612800","69971381088944128","69971432536276992"),null),
    instanceAlert("default_04", "instanceAlert", "活动告警", Arrays.asList("69970427069333504"),Arrays.asList("97141350197100544"));
    private final String code;
    private final String name;
    private final String id;
    //需要显示的分组id
    private final List<String> groupId;
    //需要过滤的分组id
    private final List<String> exclusiveGroupId;

    DefaultMonitorTabEnum(String id, String code, String name, List<String> groupId,List<String> exclusiveGroupId) {
        this.code = code;
        this.id = id;
        this.name = name;
        this.groupId = groupId;
        this.exclusiveGroupId = exclusiveGroupId;
    }

    public static DefaultMonitorTabEnum getDefaultMonitorTab(String id) {
        for (DefaultMonitorTabEnum defaultMonitorTabEnum : DefaultMonitorTabEnum.values()) {
            if (defaultMonitorTabEnum.getId().equals(id)) {
                return defaultMonitorTabEnum;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public List<String> getGroupId() {
        return groupId;
    }

    public List<String> getExclusiveGroupId() {
        return exclusiveGroupId;
    }

    public String getId() {
        return id;
    }
}
